package com.yilin.platform.entity.pab;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.platform.base_core.application.BaseEntity;
import com.yilin.platform.base_core.tools.pab.base.XmlField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "pab_file_download ")
@TableName(value = "pab_file_download")
public class PabFileDownLoad extends BaseEntity {

    public enum DownloadStatus{
        downloading(0,"正在获取"),
        complete(1,"获取成功");
        @EnumValue
        public Integer index;
        public String name;

        DownloadStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    @Column(name = "trade_sn")
    private String tradeSn;//流水号
    @Column(name = "file_name")
    private String fileName;//文件名称
    @Column(name = "file_path")
    private String filePath;//客户端文件路径
    @Column(name = "random_pwd")
    private String randomPwd;//随机密码
    @Column(name = "sign_data")
    private String signData;//签名值
    @Column(name = "hash_data")
    private String hashData;//SHA-1摘要

    @XmlField("file_size")
    private String fileSize;//文件大小
    @XmlField("file_desc")
    private String fileDesc;//状态描述
    @XmlField("code")
    private String code;//受理状态码

    @Column(name = "download_status")
    private DownloadStatus downloadStatus;
    @Column(name = "download_url")
    private String downloadUrl;//客户端文件转下载地址
    @Column(name = "download_count")
    private Integer downloadCount;//下载次数



    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileDesc() {
        return fileDesc;
    }

    public void setFileDesc(String fileDesc) {
        this.fileDesc = fileDesc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTradeSn() {
        return tradeSn;
    }

    public void setTradeSn(String tradeSn) {
        this.tradeSn = tradeSn;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getRandomPwd() {
        return randomPwd;
    }

    public void setRandomPwd(String randomPwd) {
        this.randomPwd = randomPwd;
    }

    public String getSignData() {
        return signData;
    }

    public void setSignData(String signData) {
        this.signData = signData;
    }

    public String getHashData() {
        return hashData;
    }

    public void setHashData(String hashData) {
        this.hashData = hashData;
    }

    public DownloadStatus getDownloadStatus() {
        return downloadStatus;
    }

    public void setDownloadStatus(DownloadStatus downloadStatus) {
        this.downloadStatus = downloadStatus;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public Integer getDownloadCount() {
        return downloadCount;
    }

    public void setDownloadCount(Integer downloadCount) {
        this.downloadCount = downloadCount;
    }
}
